package com.akita.spring.ai.entity.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 通用返回结果
 *
 * @author liguangyang
 * @since 2025-05-07
 */
@Data
@NoArgsConstructor
public class Result {

    private Integer ok;

    private String msg;

    private Result(Integer ok, String msg) {
        this.ok = ok;
        this.msg = msg;
    }

    public static Result ok() {
        return new Result(1, "ok");
    }

    public static Result fail(String msg) {
        return new Result(0, msg);
    }

}
